<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <input type="text">
    <button>点击输入</button>
    <div></div>
</body>
</html>
<script>
    var oIpt = document.querySelector("input")
    var oBtn = document.querySelector("button")
    var oDiv = document.querySelector("div")

    oBtn.onclick = function(){
        var art=""
        for(var i = 1;i<=3;i++){
            art += "<p> 第"+i+"行"+oIpt.value+"</p>"
        }
        oDiv.innerHTML = art;
    }
</script>